package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.service.IGymMemberService;
import com.ruoyi.system.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GymMemberMapper;
import com.ruoyi.system.domain.GymMember;
import com.ruoyi.common.core.text.Convert;

/**
 * 健身房会员Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-22
 */
@Service
public class GymMemberServiceImpl implements IGymMemberService
{
    @Autowired
    private GymMemberMapper gymMemberMapper;

    /**
     * 查询健身房会员
     * 
     * @param memberId 健身房会员主键
     * @return 健身房会员
     */
    @Override
    public GymMember selectGymMemberByMemberId(Long memberId)
    {
        return gymMemberMapper.selectGymMemberByMemberId(memberId);
    }

    /**
     * 查询健身房会员列表
     * 
     * @param gymMember 健身房会员
     * @return 健身房会员
     */
    @Override
    public List<GymMember> selectGymMemberList(GymMember gymMember)
    {
        return gymMemberMapper.selectGymMemberList(gymMember);
    }

    /**
     * 新增健身房会员
     * 
     * @param gymMember 健身房会员
     * @return 结果
     */
    @Override
    public int insertGymMember(GymMember gymMember)
    {
        return gymMemberMapper.insertGymMember(gymMember);
    }

    /**
     * 修改健身房会员
     * 
     * @param gymMember 健身房会员
     * @return 结果
     */
    @Override
    public int updateGymMember(GymMember gymMember)
    {
        return gymMemberMapper.updateGymMember(gymMember);
    }

    /**
     * 批量删除健身房会员
     * 
     * @param memberIds 需要删除的健身房会员主键
     * @return 结果
     */
    @Override
    public int deleteGymMemberByMemberIds(String memberIds)
    {
        return gymMemberMapper.deleteGymMemberByMemberIds(Convert.toStrArray(memberIds));
    }

    /**
     * 删除健身房会员信息
     * 
     * @param memberId 健身房会员主键
     * @return 结果
     */
    @Override
    public int deleteGymMemberByMemberId(Long memberId)
    {
        return gymMemberMapper.deleteGymMemberByMemberId(memberId);
    }
}
